package cn.psvmc.cxzapi.config.mybatisplus.injector;

import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.extension.MybatisMapWrapperFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description：返回值配置
 * @Author: WN
 * @Date: 2024/3/20 16:51:26
 **/
@Configuration
public class MybatisPlusConfig {
    /*
     * @Description 下划线转驼峰
     * @Date 2024/3/20 16:53:41
     * @Author WN
     * @Param []
     * @Return com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer
     **/
    @Bean
    public ConfigurationCustomizer mybatisConfigurationCustomizer() {
        return new ConfigurationCustomizer() {
            @Override
            public void customize(MybatisConfiguration configuration) {
                configuration.setObjectWrapperFactory(new MybatisMapWrapperFactory());
            }
        };
    }
}
